package cn.cdeden.system.dubbo;

import cn.cdeden.common.core.utils.MapstructUtils;
import cn.cdeden.system.api.RemoteLargeModelService;
import cn.cdeden.system.api.domain.vo.RemoteLargeModelVo;
import cn.cdeden.system.domain.SysLargeModel;
import cn.cdeden.system.service.ISysLargeModelService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

@RequiredArgsConstructor
@Service
@DubboService
public class RemoteLargeModelServiceImpl implements RemoteLargeModelService {

    private final ISysLargeModelService sysLargeModelService;

    @Override
    public String selectConfigByKey(String configKey) {
        return sysLargeModelService.selectConfigByKey(configKey);
    }

    @Override
    public String selectConfigByTypeKey(String configKey, String configType) {
        return sysLargeModelService.selectConfigByTypeKey(configKey, configType);
    }

    @Override
    public RemoteLargeModelVo selectRemoteDefault() {
        SysLargeModel sysLargeModel = sysLargeModelService.selectRemoteDefault();
        return MapstructUtils.convert(sysLargeModel, RemoteLargeModelVo.class);
    }
}
